Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xds: use google default creds #3673

Merged
merged 10 commits into from
Jun 11, 2020
Merged

Conversation

menghanl
Copy link
Contributor

@menghanl menghanl commented Jun 9, 2020

So the client works not only on GCE (e.g. it also read env variable for creds).
@@ -31,7 +31,7 @@ import (
"google.golang.org/grpc/internal"
)

const tokenRequestTimeout = 30 * time.Second
const tokenRequestTimeout = 3 * time.Second
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm .. what leak is this?

@menghanl
Copy link
Contributor Author

The leak is caused by "cloud.google.com/go/compute/metadata". Filed issue googleapis/google-cloud-go#2417.

I'm going to update leadcheck to ignore this goroutine.

@menghanl
Copy link
Contributor Author

This PR now also changes gRPC's google default creds to skip oauth if scope is not set. Please take a look again.

@menghanl menghanl added this to the 1.30 Release milestone Jun 10, 2020
Copy link
Contributor

@easwars easwars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could someone who understand this whole "application default creds" business better also take a look. Thanks.

@@ -58,19 +56,11 @@ var (
}
)

type s struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we please add a TODO here to re-add the leak check once the leak is fixed upstream.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor Author

@menghanl menghanl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I asked @ejona86 to take a look at the creds changes. And also tested locally and on GCE.

@@ -58,19 +56,11 @@ var (
}
)

type s struct {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@ejona86
Copy link
Member

ejona86 commented Jun 10, 2020

I asked @ejona86 to take a look at the creds changes.

And I looked at them at they seemed sane. You left off the surprising part! (That I actually, promptly, looked at it and replied.)

@@ -1,3 +1,5 @@
// +build !appengine
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is disabled for appengine, because of https://travis-ci.org/github/grpc/grpc-go/jobs/697000659#L525

@menghanl menghanl merged commit b6d6ede into grpc:master Jun 11, 2020
@menghanl menghanl deleted the xds_google_default_creds branch June 11, 2020 16:48
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants